Optimal. Leaf size=400 \[ \frac{(a d+b c) \left (a^2 d^2+8 a b c d+b^2 \left (c^2+6 d^2\right )\right ) \cos ^3(e+f x)}{3 f}-\frac{\left (3 a^2 b c \left (c^2+3 d^2\right )+a^3 \left (3 c^2 d+d^3\right )+3 a b^2 d \left (3 c^2+d^2\right )+b^3 c \left (c^2+3 d^2\right )\right ) \cos (e+f x)}{f}-\frac{3 b d \left (a^2 d^2+3 a b c d+b^2 c^2\right ) \sin ^3(e+f x) \cos (e+f x)}{4 f}-\frac{\left (18 a^2 b d \left (4 c^2+d^2\right )+24 a^3 c d^2+6 a b^2 c \left (4 c^2+9 d^2\right )+b^3 d \left (18 c^2+5 d^2\right )\right ) \sin (e+f x) \cos (e+f x)}{16 f}+\frac{1}{16} x \left (18 a^2 b d \left (4 c^2+d^2\right )+8 a^3 \left (2 c^3+3 c d^2\right )+6 a b^2 c \left (4 c^2+9 d^2\right )+b^3 d \left (18 c^2+5 d^2\right )\right )-\frac{3 b^2 d^2 (a d+b c) \cos ^5(e+f x)}{5 f}-\frac{b^3 d^3 \sin ^5(e+f x) \cos (e+f x)}{6 f}-\frac{5 b^3 d^3 \sin ^3(e+f x) \cos (e+f x)}{24 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.947514, antiderivative size = 493, normalized size of antiderivative = 1.23, number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {2793, 3023, 2753, 2734} \[ -\frac{\left (90 a^2 b c d^2 \left (c^2+4 d^2\right )+40 a^3 d^3 \left (4 c^2+d^2\right )-6 a b^2 d \left (-52 c^2 d^2+3 c^4-16 d^4\right )+b^3 \left (17 c^3 d^2+2 c^5+96 c d^4\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac{b \left (-90 a^2 d^2+18 a b c d+b^2 \left (-\left (2 c^2+25 d^2\right )\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}-\frac{\left (90 a^2 b c d^2+40 a^3 d^3-a b^2 \left (18 c^2 d-96 d^3\right )+b^3 \left (2 c^3+21 c d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}-\frac{\left (90 a^2 b d^2 \left (2 c^2+3 d^2\right )+200 a^3 c d^3-6 a b^2 d \left (6 c^3-71 c d^2\right )+b^3 \left (36 c^2 d^2+4 c^4+75 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{240 d f}+\frac{1}{16} x \left (18 a^2 b d \left (4 c^2+d^2\right )+8 a^3 \left (2 c^3+3 c d^2\right )+6 a b^2 c \left (4 c^2+9 d^2\right )+b^3 d \left (18 c^2+5 d^2\right )\right )+\frac{b^2 (2 b c-13 a d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{b^2 \cos (e+f x) (a+b \sin (e+f x)) (c+d \sin (e+f x))^4}{6 d f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2793
Rule 3023
Rule 2753
Rule 2734
Rubi steps
\begin{align*} \int (a+b \sin (e+f x))^3 (c+d \sin (e+f x))^3 \, dx &=-\frac{b^2 \cos (e+f x) (a+b \sin (e+f x)) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x))^3 \left (b^3 c+6 a^3 d+4 a b^2 d-b \left (a b c-18 a^2 d-5 b^2 d\right ) \sin (e+f x)-b^2 (2 b c-13 a d) \sin ^2(e+f x)\right ) \, dx}{6 d}\\ &=\frac{b^2 (2 b c-13 a d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{b^2 \cos (e+f x) (a+b \sin (e+f x)) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x))^3 \left (-3 d \left (b^3 c-10 a^3 d-24 a b^2 d\right )-b \left (18 a b c d-90 a^2 d^2-b^2 \left (2 c^2+25 d^2\right )\right ) \sin (e+f x)\right ) \, dx}{30 d^2}\\ &=\frac{b \left (18 a b c d-90 a^2 d^2-b^2 \left (2 c^2+25 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{b^2 (2 b c-13 a d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{b^2 \cos (e+f x) (a+b \sin (e+f x)) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x))^2 \left (3 d \left (40 a^3 c d+78 a b^2 c d+90 a^2 b d^2-b^3 \left (2 c^2-25 d^2\right )\right )+3 \left (90 a^2 b c d^2+40 a^3 d^3+b^3 \left (2 c^3+21 c d^2\right )-a b^2 \left (18 c^2 d-96 d^3\right )\right ) \sin (e+f x)\right ) \, dx}{120 d^2}\\ &=-\frac{\left (90 a^2 b c d^2+40 a^3 d^3+b^3 \left (2 c^3+21 c d^2\right )-a b^2 \left (18 c^2 d-96 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac{b \left (18 a b c d-90 a^2 d^2-b^2 \left (2 c^2+25 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{b^2 (2 b c-13 a d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{b^2 \cos (e+f x) (a+b \sin (e+f x)) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x)) \left (3 d \left (450 a^2 b c d^2+40 a^3 d \left (3 c^2+2 d^2\right )+6 a b^2 d \left (33 c^2+32 d^2\right )-b^3 \left (2 c^3-117 c d^2\right )\right )+3 \left (200 a^3 c d^3+90 a^2 b d^2 \left (2 c^2+3 d^2\right )-6 a b^2 d \left (6 c^3-71 c d^2\right )+b^3 \left (4 c^4+36 c^2 d^2+75 d^4\right )\right ) \sin (e+f x)\right ) \, dx}{360 d^2}\\ &=\frac{1}{16} \left (18 a^2 b d \left (4 c^2+d^2\right )+b^3 d \left (18 c^2+5 d^2\right )+6 a b^2 c \left (4 c^2+9 d^2\right )+8 a^3 \left (2 c^3+3 c d^2\right )\right ) x-\frac{\left (40 a^3 d^3 \left (4 c^2+d^2\right )+90 a^2 b c d^2 \left (c^2+4 d^2\right )-6 a b^2 d \left (3 c^4-52 c^2 d^2-16 d^4\right )+b^3 \left (2 c^5+17 c^3 d^2+96 c d^4\right )\right ) \cos (e+f x)}{60 d^2 f}-\frac{\left (200 a^3 c d^3+90 a^2 b d^2 \left (2 c^2+3 d^2\right )-6 a b^2 d \left (6 c^3-71 c d^2\right )+b^3 \left (4 c^4+36 c^2 d^2+75 d^4\right )\right ) \cos (e+f x) \sin (e+f x)}{240 d f}-\frac{\left (90 a^2 b c d^2+40 a^3 d^3+b^3 \left (2 c^3+21 c d^2\right )-a b^2 \left (18 c^2 d-96 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac{b \left (18 a b c d-90 a^2 d^2-b^2 \left (2 c^2+25 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{b^2 (2 b c-13 a d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{b^2 \cos (e+f x) (a+b \sin (e+f x)) (c+d \sin (e+f x))^4}{6 d f}\\ \end{align*}
Mathematica [A] time = 1.15591, size = 552, normalized size = 1.38 \[ \frac{-360 \left (2 a^2 b c \left (4 c^2+9 d^2\right )+2 a^3 \left (4 c^2 d+d^3\right )+a b^2 d \left (18 c^2+5 d^2\right )+b^3 c \left (2 c^2+5 d^2\right )\right ) \cos (e+f x)+20 \left (36 a^2 b c d^2+4 a^3 d^3+3 a b^2 d \left (12 c^2+5 d^2\right )+b^3 \left (4 c^3+15 c d^2\right )\right ) \cos (3 (e+f x))-2160 a^2 b c^2 d \sin (2 (e+f x))+4320 a^2 b c^2 d e+4320 a^2 b c^2 d f x-720 a^2 b d^3 \sin (2 (e+f x))+90 a^2 b d^3 \sin (4 (e+f x))+1080 a^2 b d^3 e+1080 a^2 b d^3 f x+960 a^3 c^3 e+960 a^3 c^3 f x-720 a^3 c d^2 \sin (2 (e+f x))+1440 a^3 c d^2 e+1440 a^3 c d^2 f x-720 a b^2 c^3 \sin (2 (e+f x))+1440 a b^2 c^3 e+1440 a b^2 c^3 f x-2160 a b^2 c d^2 \sin (2 (e+f x))+270 a b^2 c d^2 \sin (4 (e+f x))+3240 a b^2 c d^2 e+3240 a b^2 c d^2 f x-36 a b^2 d^3 \cos (5 (e+f x))-720 b^3 c^2 d \sin (2 (e+f x))+90 b^3 c^2 d \sin (4 (e+f x))+1080 b^3 c^2 d e+1080 b^3 c^2 d f x-36 b^3 c d^2 \cos (5 (e+f x))-225 b^3 d^3 \sin (2 (e+f x))+45 b^3 d^3 \sin (4 (e+f x))-5 b^3 d^3 \sin (6 (e+f x))+300 b^3 d^3 e+300 b^3 d^3 f x}{960 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.041, size = 489, normalized size = 1.2 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.11274, size = 644, normalized size = 1.61 \begin{align*} \frac{960 \,{\left (f x + e\right )} a^{3} c^{3} + 720 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a b^{2} c^{3} + 320 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} b^{3} c^{3} + 2160 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} b c^{2} d + 2880 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a b^{2} c^{2} d + 90 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{3} c^{2} d + 720 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c d^{2} + 2880 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} b c d^{2} + 270 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a b^{2} c d^{2} - 192 \,{\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} b^{3} c d^{2} + 320 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} d^{3} + 90 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} b d^{3} - 192 \,{\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a b^{2} d^{3} + 5 \,{\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{3} d^{3} - 2880 \, a^{2} b c^{3} \cos \left (f x + e\right ) - 2880 \, a^{3} c^{2} d \cos \left (f x + e\right )}{960 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.92437, size = 834, normalized size = 2.08 \begin{align*} -\frac{144 \,{\left (b^{3} c d^{2} + a b^{2} d^{3}\right )} \cos \left (f x + e\right )^{5} - 80 \,{\left (b^{3} c^{3} + 9 \, a b^{2} c^{2} d + 3 \,{\left (3 \, a^{2} b + 2 \, b^{3}\right )} c d^{2} +{\left (a^{3} + 6 \, a b^{2}\right )} d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (8 \,{\left (2 \, a^{3} + 3 \, a b^{2}\right )} c^{3} + 18 \,{\left (4 \, a^{2} b + b^{3}\right )} c^{2} d + 6 \,{\left (4 \, a^{3} + 9 \, a b^{2}\right )} c d^{2} +{\left (18 \, a^{2} b + 5 \, b^{3}\right )} d^{3}\right )} f x + 240 \,{\left ({\left (3 \, a^{2} b + b^{3}\right )} c^{3} + 3 \,{\left (a^{3} + 3 \, a b^{2}\right )} c^{2} d + 3 \,{\left (3 \, a^{2} b + b^{3}\right )} c d^{2} +{\left (a^{3} + 3 \, a b^{2}\right )} d^{3}\right )} \cos \left (f x + e\right ) + 5 \,{\left (8 \, b^{3} d^{3} \cos \left (f x + e\right )^{5} - 2 \,{\left (18 \, b^{3} c^{2} d + 54 \, a b^{2} c d^{2} +{\left (18 \, a^{2} b + 13 \, b^{3}\right )} d^{3}\right )} \cos \left (f x + e\right )^{3} + 3 \,{\left (24 \, a b^{2} c^{3} + 6 \,{\left (12 \, a^{2} b + 5 \, b^{3}\right )} c^{2} d + 6 \,{\left (4 \, a^{3} + 15 \, a b^{2}\right )} c d^{2} +{\left (30 \, a^{2} b + 11 \, b^{3}\right )} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 8.55227, size = 1217, normalized size = 3.04 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.67025, size = 562, normalized size = 1.4 \begin{align*} -\frac{b^{3} d^{3} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac{1}{16} \,{\left (16 \, a^{3} c^{3} + 24 \, a b^{2} c^{3} + 72 \, a^{2} b c^{2} d + 18 \, b^{3} c^{2} d + 24 \, a^{3} c d^{2} + 54 \, a b^{2} c d^{2} + 18 \, a^{2} b d^{3} + 5 \, b^{3} d^{3}\right )} x - \frac{3 \,{\left (b^{3} c d^{2} + a b^{2} d^{3}\right )} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac{{\left (4 \, b^{3} c^{3} + 36 \, a b^{2} c^{2} d + 36 \, a^{2} b c d^{2} + 15 \, b^{3} c d^{2} + 4 \, a^{3} d^{3} + 15 \, a b^{2} d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac{3 \,{\left (8 \, a^{2} b c^{3} + 2 \, b^{3} c^{3} + 8 \, a^{3} c^{2} d + 18 \, a b^{2} c^{2} d + 18 \, a^{2} b c d^{2} + 5 \, b^{3} c d^{2} + 2 \, a^{3} d^{3} + 5 \, a b^{2} d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac{3 \,{\left (2 \, b^{3} c^{2} d + 6 \, a b^{2} c d^{2} + 2 \, a^{2} b d^{3} + b^{3} d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} - \frac{3 \,{\left (16 \, a b^{2} c^{3} + 48 \, a^{2} b c^{2} d + 16 \, b^{3} c^{2} d + 16 \, a^{3} c d^{2} + 48 \, a b^{2} c d^{2} + 16 \, a^{2} b d^{3} + 5 \, b^{3} d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]